Samples on json to json conversion in apigee using javascript

I have a usecase where I need to do json to json conversion using javascript in Apigee.

I am new to javascript.Could someone please provide me with samples on this?

0 3 911
3 REPLIES 3

@Subbu R , Can we have more details like what kind of transformation you are trying to do ? What is the input json, what is the expected json ? A simple json conversion looks like below one, you can try execute same in browser console to see output.

var apigeek1 = {
  fname: "Anil",
  lname: "Sagar",
  company: "Apigee"
}


console.log(apigeek1)


apigeek1.skills = ["NodeJS", "Apigee"]


delete(apigeek1.lname)


console.log(apigeek1)

Not applicable
@Subbu R

You can also think about the json as an string in Javscript.

Javascript string functions are very similar to the Java ones. You can take a look into this:

http://www.w3schools.com/js/default.asp