Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Convert and replace the value of an input field.
- # ({$date:"..."} is Mongo's Extended BSON syntax.)
- echo '{"version":1,"account_id":"123","country":"DE","currency":"EUR","date":"2010-07-13T14:27:00"}' | \
- jq -rc \
- '. | . + { date: { "$date": "\(.date).0000000Z" } }'
- # Output
- # {"version":1,"account_id":"123","country":"DE","currency":"EUR","date":{"$date":"2010-07-13T14:27:00.0000000Z"}}
Add Comment
Please, Sign In to add comment