AnsweredAssumed Answered

How to Extract null value from a JSON using Evaluate JSON Path Expression ?

Question asked by Sathish2306 on Sep 8, 2015
Latest reply on Sep 9, 2015 by goeer03

Hi ,

 

So i have json response like this,

{

    "description": "A this good",

    "longDescription": "A this good",

    "displayName": "A this good",

    "repositoryId": "12012121",

    "thumbnailImageUrl": null

}

 

Now i need to convert the above json into below json,

 

{

  "image": null,

  "id": "12012121"

}

 

I used Evaluvate JSON path Expression to get the "thumbnailImageUrl", but i got an error like this,

 

What should i do to extract that null value from the json ?

 

 

</l7:assertionResult>

 

<l7:assertionResult assertion="l7p:EvaluateJsonPathExpression" status="No Error" />

<l7:assertionResult assertion="l7p:FaultLevel" status="No Error" />

<l7:assertionResult assertion="l7p:SetVariable" status="No Error" />

<l7:assertionResult assertion="l7p:EvaluateJsonPathExpression" status="Error in Assertion Processing">

<l7:detailMessage id="9648">
Error occurred evaluating JSON Path: 'null'

 

</l7:detailMessage>
</l7:assertionResult>

<l7:assertionResult assertion="l7p:ForEachLoop" status="Error in Assertion Processing" />

<l7:assertionResult assertion="l7p:All" status="Error in Assertion Processing" />

<l7:assertionResult assertion="l7p:OneOrMore" status="Error in Assertion Processing" />

<l7:assertionResult assertion="l7p:All" status="Error in Assertion Processing" />

</

l7:policyResult>

Outcomes