How to replace in javascript

  javascript

How to replace automatically generate values
Like I have Parameters as below shown:
"Observations/2/result" ,"Observations/3/result", "Observations/4/result" …etc.
Those attribute names will generate automatically with numeric values.
The below script can help only for static values, but I want to replace automatically generate values.
Thank you.

jsonString = jsonString.replace(""Observations/2/result":", ""result":"); 


Source: Ask Javascript Questions

LEAVE A COMMENT