You need to sign in to do that
Don't have an account?

to check if json node exist
How can I check using APEX if a JSON node exist in the input as in below?
Payload1
{
"lname": "l1",
"fname": "f1"
}
Payload2
{
"lname": "l1"
}
Thanks
Manohar
Payload1
{
"lname": "l1",
"fname": "f1"
}
Payload2
{
"lname": "l1"
}
Thanks
Manohar
Or, you could use JSON.deserialize() to create a collection of objects and then see if the object you want exists, and what values it has.
Glyn Anderson
Sr Developer | System Analyst | ClosedWon | closedwon.com
Certified Developer | Certified Advanced Administrator
Blog: GlynATheApexGuy@blogspot.com
Twitter: @GlynAtClosedWon
All Answers
Or, you could use JSON.deserialize() to create a collection of objects and then see if the object you want exists, and what values it has.
Glyn Anderson
Sr Developer | System Analyst | ClosedWon | closedwon.com
Certified Developer | Certified Advanced Administrator
Blog: GlynATheApexGuy@blogspot.com
Twitter: @GlynAtClosedWon