cancel
Showing results for 
Search instead for 
Did you mean: 

Converting List of one item to Object

GBekkanti
New Contributor III

Hi Team,

Can you please let me know how to convert list of one object to one object.

Thanks in Advance!

4 REPLIES 4

cjhoward18
Employee
Employee

Can you give an example of the input data and desired output data?

I’m not sure I understand what you want to do.

Thanks,
Cole

GBekkanti
New Contributor III

Hi @cjhoward18,

I am getting the data from source as below
[{poNumber:12345, poItem:12, changedOn:2019-02-28}]
I wan to convert the data to as below
{poNumber:12345, poItem:12, changedOn:2019-02-28}

I need to remove the object from list.

Thanks and Regards,
Gopi Bekkanti.

if you know it is going to be a fixed sized array of one object you can use a mapper to access the element like this $arrayOfObject[0] then map it to a new variable like $object as the target and you will have pulled out the object from the array.

Alternatively, you can make the list empty by using pop() like $arrayOfObject.pop() and map that to $object

Ganesh
New Contributor II

You can try JSON Splitter in case of converting array values to individual objects.