cancel
Showing results for 
Search instead for 
Did you mean: 

"Utility - JSON::JsonPath - Return Collection" throwing error

Cuckoo
Level 3

Hello Community members,

Help required in parsing the JSON file and trying to extract the values using JSON path.

Tried to extract using "Utility - JSON::JsonPath". It works fine. But for returning a collection something went wrong.

In "Utility - JSON::JsonPath - Return Collection" I'm getting the following error:

Exception thrown --> "Internal : Could not execute code stage because exception thrown by code stage: Unable to cast object of type 'System.String' to type 'System.Data.DataTable'."

JSON for parsing:

{
   "Vegitables":[
      {
         "Code":"VEG54454",
         "Weight":"1KG",
         "Price":"25/-",
         "Name":"Redcabbage"
      },
      {
         "Code":"VEG46278",
         "Weight":"1KG",
         "Price":"10/-",
         "Name":"Spanich"
      },
      {
         "Code":"VEG62312",
         "Weight":"1KG",
         "Price":"40/- ",
         "Name":"Capiscum"
      }
   ]
}

I/P tab details in Utility - JSON::JsonPath - Return Collection:

---------------------------------------------------------------------------------

Cuckoo_0-1729070416574.png

O/P tab details in Utility - JSON::JsonPath - Return Collection:

----------------------------------------------------------------------------------

Cuckoo_1-1729070459820.png

Thanks in Advance,

Cuckoo George

0 REPLIES 0