bazaarvoice / jolt

JSON to JSON transformation library written in Java.
Apache License 2.0
1.56k stars 329 forks source link

want to dynamically update the value in json structure #1100

Open kun1107 opened 3 years ago

kun1107 commented 3 years ago

"templates": [

                            "test": [
                                {
                                    "id": 151023,
                                    "quoteTemplateId": 1069754,
                                    "testId": 3001002939,
                                    **_"quantity": 7.5,_**
                                    "price": 542.0,
                                    "usi": "1030084857DH-3001002939",
                                    "instrumentSymbol": "CZ2021e058233b-b6bd-438a-9519-19763efc3f80",
                                    "tradeDate": "2021-08-24T00:00:00",
                                    "counterpartyCode": "",
                                    "portfolioName": "",
                                    "tradeOrder": 1,
                                    "associationId": 128661,
                                    "contractId": "",
                                    "subcontractId": "",
                                    "location": "",
                                    "salesPerson": "",
                                    "instrumentTypeAlias": "Focal Point"
                                }
                            ]

                        }
                    ]

I want to update the "quantity" field from 7.5 to any value which I receive dynamically from UI or any other service. is there any syntax available in jolt to perform this task?