cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Unable to convert complex JSON object into infotable using parsley extension

ranjank
14-Alexandrite

Unable to convert complex JSON object into infotable using parsley extension

Hi,

 

I am using ParseJSON method for Parsley extension. 

It gives me one row properly inserted into infotable if we run this method on simple json like:-

 

{

                "input1":"{\"name\":\"MichaelJordan\",\"age\":\"38\",\"address\":\"Noida\" }"

}

 

But it fails to insert any row when we run this method on complex JSON:-

{

                "input2":"{\"name\":\"TestUser123\",\"age\":\"54\",\"address\":\"{\"street\":\"main street\",\"city\":\"Ggn\",\"pin\":\"202021\"}\"}"

}

and gives blank row.

 

Could somebody help me how to insert this json into infotable as well?

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:ranjank)

Have you thought of just creating your own parsing code.

JSON is recognized as an object in Thingworx and you can use es 4 / es 6

So if you know the structure you can fairly easily create your own parsing code.

 

View solution in original post

2 REPLIES 2
PaiChung
22-Sapphire I
(To:ranjank)

Have you thought of just creating your own parsing code.

JSON is recognized as an object in Thingworx and you can use es 4 / es 6

So if you know the structure you can fairly easily create your own parsing code.

 

slangley
23-Emerald II
(To:ranjank)

Hi @ranjank.

 

If you found the previous response to be an acceptable solution, please mark it as the Accepted Solution for the benefit of others on the community.

 

Regards.

 

--Sharon

Top Tags