skip to Main Content

Jquery – How to edit JSON file to remove particular client entries with jq or sed or similar command

Having a json file menu.json and need to remove only client2 related entries from the "collect.whitelist" line. Any help appreciated. { "connect.class": "io.connector.MongoDbConnect", "tasks.max": "2", "snapshot.delay.ms": "1500", "collect.whitelist": "client1_creat.plan.header,client1_creat.plan.ref-data,client1_creat.plan.line.view,client1_creat.plan.inventory.view,client1_creat.plan.period.lines,client1_creat.plan.products,client1_creat.constraint,client1_creat.separation,client1_creat.plan.guidelines,client1_creat.plan.spots,client1_creat.plan.spot.links,client1_creat.plan.deal.link,client1_creat.plan.line.target,client1_creat.plan.digital.period.lines,client1_creat.plan.digital.lines,client1_creat.plan.deal.link,client1_creat.plan.quarter.view,client1_creat.plan.line.weekly.spots,client1_creat.plan.total.view,client1_creat.plan.weekly.view,client1_creat.condition.status,client1_creat.plan.additionalfees,client1_creat.plan.digital.period.view,client1_creat.plan.line.weekly.totals.view,client1_creat.plan.buyer.goals,client1_creat.plan.period.line.lineage.comments,client1_creat.plan.books,client1_creat.plan.line.attributes,client2_creat.plan.header,client2_creat.plan.ref-data,client2_creat.plan.line.view,client2_creat.plan.inventory.view,client2_creat.plan.period.lines,client2_creat.plan.products,client2_creat.constraint,client2_creat.separation,client2_creat.plan.guidelines,client2_creat.plan.spots,client2_creat.plan.spot.links,client2_creat.plan.deal.link,client2_creat.plan.line.target,client2_creat.plan.digital.period.lines,client2_creat.plan.digital.lines,client2_creat.plan.deal.link,client2_creat.plan.quarter.view,client2_creat.plan.line.weekly.spots,client2_creat.plan.total.view,client2_creat.plan.weekly.view,client2_creat.condition.status,client2_creat.plan.additionalfees,client2_creat.plan.digital.period.view,client2_creat.plan.line.weekly.totals.view,client2_creat.plan.buyer.goals,client2_creat.plan.period.line.lineage.comments,client2_creat.plan.books,client2_creat.plan.line.attributes,client3_creat.plan.header,client3_creat.plan.ref-data,client3_creat.plan.line.view,client3_creat.plan.inventory.view,client3_creat.plan.period.lines,client3_creat.plan.products,client3_creat.constraint,client3_creat.separation,client3_creat.plan.guidelines,client3_creat.plan.spots,client3_creat.plan.spot.links,client3_creat.plan.deal.link,client3_creat.plan.line.target,client3_creat.plan.digital.period.lines,client3_creat.plan.digital.lines,client3_creat.plan.deal.link,client3_creat.plan.quarter.view,client3_creat.plan.line.weekly.spots,client3_creat.plan.total.view,client3_creat.plan.weekly.view,client3_creat.condition.status,client3_creat.plan.additionalfees,client3_creat.plan.digital.period.view,client3_creat.plan.line.weekly.totals.view,client3_creat.plan.buyer.goals,client3_creat.plan.period.line.lineage.comments,client3_creat.plan.books,client3_creat.plan.line.attributes,client4_creat.plan.header,client4_creat.plan.ref-data,client4_creat.plan.line.view,client4_creat.plan.inventory.view,client4_creat.plan.period.lines,client4_creat.plan.products,client4_creat.constraint,client4_creat.separation,client4_creat.plan.guidelines,client4_creat.plan.spots,client4_creat.plan.spot.links,client4_creat.plan.deal.link,client4_creat.plan.line.target,client4_creat.plan.digital.period.lines,client4_creat.plan.digital.lines,client4_creat.plan.deal.link,client4_creat.plan.quarter.view,client4_creat.plan.line.weekly.spots,client4_creat.plan.total.view,client4_creat.plan.weekly.view,client4_creat.condition.status,client4_creat.plan.additionalfees,client4_creat.plan.digital.period.view,client4_creat.plan.line.weekly.totals.view,client4_creat.plan.buyer.goals,client4_creat.plan.period.line.lineage.comments,client4_creat.plan.books,client4_creat.plan.line.attributes", "ssl.enabled": "true", "members.auto.discover": "true", "name": "source_mongodb", "ssl.invalid.allowed": "true", "snapshot.mode": "never" }…

VIEW QUESTION

Customise JSON in pipeline expression builder of ADF

There is a variable in ADF that holds the below value. @json(concat('{','"S.No":',variables('counter'),',"Input Table":"Input TblName","Output Table":"[Tbl1, tbl2, Tbl3]", "Status":"Successful"}')) I pass this variable to a logic app using Web activity and use 'Create HTML Table' to convert this json to a…

VIEW QUESTION

Json – jq filtering on specific key and collating values into single csv cell

Given this json: {"data": [ { "account_id": "123", "account_status": "active", "name": "john doe", "email": "[email protected]", "product_access": [] }, { "account_id": "345", "account_status": "active", "name": "jane doe", "email": "[email protected]", "last_active": "2023-08-23T13:03:27.811473590Z", "product_access": [ { "name": "Product 1", "key": "product1", "url": "acme1.com"…

VIEW QUESTION
Back To Top
Search