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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Edit JSON

AitorP
7-Bedrock

Edit JSON

I have a JSON from Infotable, but I have a lot of information i don't need. I just want "rows". I do not want "datashape". What is the code to take only "rows" or delete the "datashape"?

 

json=

{
"rows":[
      {"Desc":"b",
       "Class":"d",      
     }],


"dataShape":{
      "fieldDefinitions":{
                       "Desc":{
                              "name":"Desc",
                             "aspects":{"isPrimaryKey":false},
                            "description":"",
                            "baseType":"STRING",
                            "ordinal":2},
                       "Class":{
                             "name":"Class",
                             "aspects":{"isPrimaryKey":false},
                            "description":"",
                            "baseType":"STRING",
                            "ordinal":3},

                        }}
}

2 REPLIES 2
AitorP
7-Bedrock
(To:AitorP)

delete jsonData['dataShape'];

slangley
23-Emerald II
(To:AitorP)

Hi @AitorP.

 

We're not understanding your use case.  It should be possible to access the row element and ignore anything else.  If you can explain further, we will try to assist.

 

Regards.

 

--Sharon

Announcements


Top Tags