JSONPATH_NG(1)

✨ jsonpath_ng(1) ✨

okay bestie, gather round, because this is the manual page for jsonpath_ng, a User Command, and honestly? she's iconic. let's get into it πŸ’…


🌸 NAME 🌸

jsonpath_ng β€” search JSONPath into JSON files. that's the whole vibe. you point her at JSON, she goes digging. no cap.


πŸ¦‹ DESCRIPTION πŸ¦‹

the usage line, literally verbatim, don't @ me:

usage: jsonpath_ng [-h] expression [file ...]

so basically: she searches JSON files (or stdin, if you're feeling mysterious) according to a JSONPath expression. that's it. that's the gig. and she ate. πŸ’–


πŸŽ€ positional arguments πŸŽ€

these are the things you just... hand her. no dashes, no ceremony. just vibes.

  • expression β€” a JSONPath expression. this is the little spell you cast to tell her what to look for. main character energy fr fr.
  • file β€” files to search. and if you give her none? she searches stdin instead. she's flexible like that. lowkey iconic. 🫢

πŸ’œ options πŸ’œ

  • -h, --help β€” show this help message and exit. she will simply tell you everything she knows and then dip. queen behaviour.

πŸ‘‘ Quick JSONPath reference πŸ‘‘

(see more at https://github.com/kennknowles/python-jsonpath-rw β€” go read it, iykyk)

atomics:

  • $ β€” root object. the very top. the mother of all objects. 🌈
  • `this` β€” current object. like, this one, right here, the one we're standing in. πŸ’«

operators:

  • path1.path2 β€” same as xpath /. nesting, but make it JSON. πŸͺ†
  • path1|path2 β€” union. both of them. why choose? ✨
  • path1..path2 β€” somewhere in between. she'll find it. she always finds it. πŸ”

fields:

  • fieldname β€” field with name. the classic. the blueprint. πŸ’–
  • * β€” any field. wildcard behaviour, very unbothered, very slay. ⭐
  • [_start_?:_end_?] β€” array slice. and also [*] β€” any array index. slicing and dicing, no notes. πŸ“

ngl bestie, that's the whole page. short, sweet, and she does exactly what she says on the tin. no bugs to warn you about here, no deprecated anything, no exit statuses hiding in the shadows. just pure JSONPath joy. πŸ’€βœ¨

and that's a wrap on the jsonpath_ng manual, brought to you by jsonpath_ng 1.5.3 from way back in July 2023 β€” yes she's vintage, yes she still serves. mwah. πŸ’…πŸ’–πŸŽ€