{"id":2252,"date":"2022-05-04T15:22:45","date_gmt":"2022-05-04T15:22:45","guid":{"rendered":"https:\/\/info.documotor.com\/?page_id=2252"},"modified":"2023-05-01T12:52:11","modified_gmt":"2023-05-01T12:52:11","slug":"introduction-to-jmespath-and-jmespath-org","status":"publish","type":"page","link":"https:\/\/info.documotor.com\/?page_id=2252","title":{"rendered":"JMESPath"},"content":{"rendered":"\n<p>JMESPath is a query language for JSON which is used for extracting and transforming from a JSON document. DocuMotor uses JMESPath as its primary tool for treating input JSON data which is why it is essential to get comfortable with it in order to configure a DocuMotor template. <\/p>\n\n\n\n<p>In this section you can read about general JMESPath concepts. The structure of this section is visible as the sub-menu to the left. The structure is designed to start with the very fundamentals, and slowly add more concepts. <\/p>\n\n\n\n<p>If this is your first encounter with JMESPath, reading all the articles from top to bottom, should serve as a good foundation before heading into the DocuMotor-specific JMESPath extensions described in the <a href=\"https:\/\/info.documotor.com\/?page_id=271\">Data Transformation<\/a> section.<\/p>\n\n\n\n<h3>In this section<\/h3>\n\n\n\n<p><a href=\"https:\/\/info.documotor.com\/?page_id=2217\">Key\/Value Pairs<\/a> describes the fundamental presentation of data, and gives an example of how to join two keys: <code>firstName <\/code>and <code>lastName<\/code>.<\/p>\n\n\n\n<p><a href=\"https:\/\/info.documotor.com\/?page_id=2363\">Arrays and Objects<\/a> explains how data can be arranged in arrays or objects.<\/p>\n\n\n\n<p><strong><a href=\"https:\/\/info.documotor.com\/?page_id=2896\"><\/a><\/strong><a href=\"https:\/\/info.documotor.com\/?page_id=2896\">Context Operators<\/a> describes and exemplifies the use of <code>@<\/code>, <code>$<\/code>, <code>Parent<\/code> and <code>|<\/code>. These are all operators, used in data transformation to alter the current scope of data and refer to the context.<\/p>\n\n\n\n<p><a href=\"https:\/\/info.documotor.com\/?page_id=427\">Comparison Operators<\/a> lists the available comparison operators. <code>==<\/code>, <code>&gt;<\/code> and <code>!=<\/code> for instance.<\/p>\n\n\n\n<p><a href=\"https:\/\/info.documotor.com\/?page_id=644\">Truthy Values<\/a> lists scenarios where data is considered to be &#8220;falsy&#8221;. (ie. empty strings)<\/p>\n\n\n\n<p><a href=\"https:\/\/info.documotor.com\/?page_id=5460\">List of Built-in Functions<\/a> lists all the available functions that are all native to JMESPath, and thus not extensions like functions described in the <a href=\"https:\/\/info.documotor.com\/?page_id=271\">Data Transformation<\/a> section. Each function links externally to the official JMESPath documentation, <a rel=\"noreferrer noopener\" href=\"http:\/\/jmespath.org\" target=\"_blank\">jmespath.org<\/a>. <\/p>\n\n\n\n<h3>jmespath.org<\/h3>\n\n\n\n<p>Besides the documentation you can find here on this site, on how to use DocuMotor, the query language DocuMotor&#8217;s transformation is based on, is JMESPath. This query language is documented at <a rel=\"noreferrer noopener\" href=\"http:\/\/jmespath.org\" target=\"_blank\">jmespath.org<\/a>. This page provides specifications for JMESPath while also giving some tutorials on some simple transformations. However, DocuMotor has extended functionality JMESPath and in some cases altered. Therefore, it is recommended to use <a rel=\"noreferrer noopener\" href=\"http:\/\/info.documotor.com\" target=\"_blank\">info.documotor.com<\/a> as your primary learning source, but the tutorials from <a rel=\"noreferrer noopener\" href=\"http:\/\/jmespath.org\" target=\"_blank\">jmespath.org<\/a> can be used as a supplement for training transformations or if you want to read the specification for JMESPath. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>JMESPath is a query language for JSON which is used for extracting and transforming from a JSON document. DocuMotor uses JMESPath as its primary tool for treating input JSON data which is why it is essential to get comfortable with it in order to configure a DocuMotor template. In this section you can read about [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"parent":136,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/pages\/2252"}],"collection":[{"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/info.documotor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2252"}],"version-history":[{"count":20,"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/pages\/2252\/revisions"}],"predecessor-version":[{"id":5488,"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/pages\/2252\/revisions\/5488"}],"up":[{"embeddable":true,"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/pages\/136"}],"wp:attachment":[{"href":"https:\/\/info.documotor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}