jsonpath
jsonpath copied to clipboard
difference of values
const cities = [ { name: "London", "population": 8615246 }, { name: "Berlin", "population": 3517424 }, { name: "Madrid", "population": 3165235 }, { name: "Rome", "population": 2870528 } ];
Can i calculate the difference of populations of London and Berlin using jsonpath?
I have understood that jsonpath is only to retrive data, not to perform operations.
I agree with Robert. Check 'json-tots' npm package for JSON document level operations and JSON transformation