Converting a JSON Structure into key-value pair|ardoJSON

Hi,

I am trying to convert a JSON Structure into key-value pair using ardoJSON (JSONListify) and am getting the below error. I have provided the oml. Could anyone please help me with this?


JSON_Test.oml

Hi  Hemalatha,

I corrected some json paths and the listify flow . Now working for name and menuitemIds   as well.

Please find attached oml

Best Regards

Devendra

 

JSON_Test_workingv2.oml

HI Hemalatha,

Seems like the JSON result that you are getting from API is not a valid JSON. and JSON_Listify needs a valid JSON to parse.

https://personal-lxi8etrr.outsystemscloud.com/Stubs/rest/StubForCoinRate/GetStructure

Kindly check the out put of the JSON in below JSON validator URL

https://jsonformatter.curiousconcept.com/#

Best Regards

Devendra





Hi Devendra,

I am using the attached JSON Structure. Kindly take a look into it.

Many Thanks,

Hema

JSON_Structure.txt

Hi Hemalatha,

I think with the above  JSON structure its working. Please find attached screenshot.

And attached is the working OML.

 

JSON_Test_Working.oml

Hi Devendra,

Kindly take a look into this oml.

Thanks,

Hema

Stubs.oml

Hi Hemalatha ,

Problem is with your JSON structure you need to replace  "James's" by "James\'s" to make the JSON structure valid.

Please find attached  working oml.

Best Regards

Devendra

Stubs_Working.oml

Hi Devendra,

Thanks a lot.

Is there a way to convert the below also to key value pairs?

Hi Hemalatha,

As your  JSON path in JSON structure is dynamic  you need to write some logic to convert it to key value pair using JSON listify


Below are  the steps 

1. JSON listify to convert the dynamic path to keys

2. JSON select to get all the keys as list of path

3. Loop through all the keys and make a dynamic path to select topNav

4. Listify topNav and other objects

Attached is the working sample to convert the topNav and banner object to key value pair.

Hope that would help you.

Best regards

Devendra





JSON_Test_workingv2.oml

Hi Devendra,

Thanks so much for the resolution.

Along with topNav and banner, I tried to convert name and menuitemIds to key-value pair but it is not working. I have attached the oml as well.

JSON_Test_workingv2.oml

Hi  Hemalatha,

I corrected some json paths and the listify flow . Now working for name and menuitemIds   as well.

Please find attached oml

Best Regards

Devendra

 

JSON_Test_workingv2.oml

Thanks so much, Devendra. It is working as expected.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.