File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 4848
4949The ``jmespath.py `` library has two functions
5050that operate on python data structures. You can use ``search ``
51- and give it the jmespath expression and the data::
51+ and give it the jmespath expression and the data:
52+
53+ .. code :: python
5254
5355 >> > import jmespath
5456 >> > path = jmespath.search(' foo.bar' , {' foo' : {' bar' : ' baz' }})
5557 ' baz'
5658
5759 Similar to the ``re `` module, you can use the ``compile `` function
5860to compile the JMESPath expression and use this parsed expression
59- to perform repeated searches::
61+ to perform repeated searches:
62+
63+ .. code :: python
6064
6165 >> > import jmespath
6266 >> > expression = jmespath.compile(' foo.bar' )
@@ -75,7 +79,9 @@ Options
7579You can provide an instance of ``jmespath.Options `` to control how
7680a JMESPath expression is evaluated. The most common scenario for
7781using an ``Options `` instance is if you want to have ordered output
78- of your dict keys. To do this you can use either of these options::
82+ of your dict keys. To do this you can use either of these options:
83+
84+ .. code :: python
7985
8086 >> > import jmespath
8187 >> > jmespath.search(' {a: a, b: b} ,
You can’t perform that action at this time.
0 commit comments