rcdmk / aspJSON

A fast classic ASP JSON parser and encoder for easy JSON manipulation to work with the new JavaScript MV* libraries and frameworks.
MIT License
204 stars 89 forks source link

Remove quotes when needed #26

Closed RaviRamDhali closed 7 years ago

RaviRamDhali commented 7 years ago

Is it possible to have an option to remove the quotes from the value object when needed

' instantiate the class
dim eachJson
set eachJson = New JSONobject
' add properties
eachJson.Add "coordinates", getCoorFromDatabase

Current coordinates values Output (with quotes) "49.31184267863867,-121.4249459505081"

{"label":[{"coordinates":"49.31184267863867,-121.4249459505081","title":"Cove"}]}

Expected coordinates values Output (without quotes) 49.31184267863867,-121.4249459505081

{"label":[{"coordinates":49.31184267863867,-121.4249459505081,"title":"Cove"}]}
RaviRamDhali commented 7 years ago

I got it working .. Parse object into array

Dim outputObj
set outputObj = eachJson.parse(getCoorFromDatabase)

eachJson.Add "coordinates", outputObj
rcdmk commented 7 years ago

Hi. I'm glad you found the solution. ;-)