Issue while writing update query

Hi Team,

I am writing update query to update my mongodb collection, however it is throwing invalid json error.
Please find details below and kindly help me to fix this issue.
In Mongodb collection I have list and input I am passing is a string with comma separated so I want to split that string with comma and update like list.
My code:
{"$set":{"field_names" :"$echo": "'{{textInput8.value}}' | jq -c 'split(',')'"}}

Error: Invalid Json

MongoDb structure:


Hey Lalitha.C! Happy to help :slight_smile:

Here's an example MongoDB query that works for me:

So your code could be something more like:

{$set:{"field_names" :"$echo": {{textInput8.value}} }}

Out of curiosity, what would you like | jq -c 'split(',') to do?