Guest User

Untitled

a guest
Oct 22nd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. # Convert and replace the value of an input field.
  2. # ({$date:"..."} is Mongo's Extended BSON syntax.)
  3.  
  4. echo '{"version":1,"account_id":"123","country":"DE","currency":"EUR","date":"2010-07-13T14:27:00"}' | \
  5. jq -rc \
  6. '. | . + { date: { "$date": "\(.date).0000000Z" } }'
  7.  
  8. # Output
  9. # {"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