Hello,
I'm trying to parse this kind of json data to store it in database. Problem is that json presents questions and replies to those. Questions could change without prefer notice and also amount of questions in json could also vary.
Example:
{"Question 1":"Reply to question 1","Question 2":"Reply to question 2","Additional question":"Reply to additional question"}
How could I iterate/loop this content so that I could save it to database? My problem is that I could not use normal "parse json", as questions could change any time.
Any hints how to start resolving this appreciated!
Hi Pstork1
Thanks for and excellent idea! Anyhow trying this I ended up in trouble, that those reply datas are free text and they contain commas and colons. So when I split string with comma separators, results could be unwanted.
Like this Question 1 would split between Yes and I:
{"Question 1":"Yes, I want to do that","Question 2":"Reply to question 2","Additional question":"Reply to additional question"}
Same trouble if there appear colons.
Can you try replacing the ", with a different character like "|. That should avoid the embedded commas in the values.
Thank you for hints again, but I end up in troubles in any way I think.
It seems, that numeric response values are not in "", like:
"How much?":9,"Next question"...
There might also be : in field values, like:
"Free text":"The thing is: I think that this is not working"...
Full example:
{"Rating 1-10?":8,"Question 2":"Reply to question 2","Additional question":"Response is: here"}
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
8 | |
2 | |
2 | |
1 | |
1 |