cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to skip null objects in a list

nitishjain
Deputy Chef I
Deputy Chef I

I'm getting null objects in my filtered list. how can I remove the null objects w/o using Pythion script?
Example:
[{"name" : "Nitish",

"Id": "010"},

{},

{"name" : "Nitesh",

"Id": "020"}]

1 ACCEPTED SOLUTION

Hi @nitishjain ,
Once you receive the filtered response( includes empty items) use again the parse Json where need to pass following way
1. Add the sample response you receive as as sample request. ( your List response)
2. pass the actual array response in the below format.

List response.PNG


Thanks and Regards,
Shivakumar A


View solution in original post

5 REPLIES 5

shivakumara
Executive Chef II
Executive Chef II

Hi @nitishjain ,

Just use below solution in formula mode, Please let me know if you need further information.

 

Thanks and Regards,
Shivakumara A

Capture.PNG

Capture_output response.PNG

in logger it removes by using "- [{}]" but how do I remove it in actual?

Hi @nitishjain,
What do you mean by 'actual'? Could you please ask the question more precisely?

Thanks and Regards,
Shivakumar K A

HI @shivakumara 

Thanks for checking, I have a parse json where I'm creating a json structure and later on I'm using list where I checks some condition in all fields and get some empty objects in filtered response.
now I want to remove those empty objects.

Please let me know an optimized  solution.

let me know if you want more details or we can connect over a call.

 

Thanks

Nitish