Page 1 of 1

Parsing a JSON string to an object

Posted: Mon Aug 07, 2023 8:11 am
by huangguangc
Hello,

i have a question about how to parse JSON string. The data I obtained from the api is as follows

Code: Select all

{
  "name": "Andy",
  "occupation": "[{"id": 1, "name": "Teacher"}, {"id": 2, "name": "doorkeeper"}]"
}
I need to get all of his occupations from the string type JSON array field. How can I do that? Thanks.

Re: Parsing a JSON string to an object

Posted: Mon Aug 07, 2023 9:46 pm
by Lech Kulikowski
Hello,

In that case, you should use the following data structure:

Code: Select all

{
  "name": "Andy",
  "occupation": [{"id": 1, "name": "Teacher"}, {"id": 2, "name": "doorkeeper"}]
}
there are no ways to parse it as a string in the designer.
Thank you.