[JSON] How to remove object
Posted: Tue Jun 25, 2019 7:16 pm
I'm testing RemoveJSONElement and RemoveJSONMember not work for my, what remove "lineup" object?
Code: Select all
Define json_text$ = "[{"+Chr(34)+"example"+Chr(34)+":"+Chr(34)+"1"+Chr(34)+","+Chr(34)+"lineup"+Chr(34)+":{"+Chr(34)+"element"+Chr(34)+":"+Chr(34)+"element1"+Chr(34)+"}}]"
ParseJSON(0, json_text$)
If IsJSON(0)
; RemoveJSONElement(JSONValue(0),1)
; RemoveJSONMember(JSONValue(0),"lineup")
Debug ComposeJSON(0)
EndIf