Is there an [XSLT](http://www.w3.org/TR/xslt) equivalent for JSON? Something to allow me to do transformations on JSON like XSLT does to XML.
['https://Stackoverflow.com/questions/1618038', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/147141/']
XSLT equivalents for JSON - a list of candidates (tools and specs)

Tools
=====

**1. [XSLT](http://www.w3.org/TR/xslt-30/#json)**

You can use [XSLT for JSON](http://www.w3.org/TR/xslt-30/#json) with the aim of [fn:json-to-xml](https://www.w3.org/TR/xslt-30/#func-json-to-xml).

> 
> This section describes facilities allowing JSON data to be processed using XSLT.
> 
> 
> 

**2. [jq](https://stedolan.github.io/jq/)**

> 
> jq is like sed for JSON data - you can use it to slice and filter and map and transform structured data with the same ease that sed, awk, grep and friends let you play with text.
> There are install packages for different OS.
> 
> 
> 

**3. [jj](https://github.com/tidwall/jj)**

> 
> JJ is a command line utility that provides a fast and simple way to retrieve or update values from JSON documents. It's powered by GJSON and SJSON under the hood.
> 
> 
> 

**4. [fx](https://github.com/antonmedv/fx)**

> 
> Command-line JSON processing tool
> 
> 
> * Don't need to learn new syntax
> * Plain JavaScript
> * Formatting and highlighting
> * Standalone binary
> 
> 
> 

**5. [CsvCruncher](https://github.com/OndraZizka/csv-cruncher/)**

> 
> Command-line tabular data SQL-based processing tool
> 
> 
> * Don't need to learn new syntax
> * Suitable when JSON contains a large array with similar items
> * Supports multiple documents to be processed as multiple SQL tables
> * Written in Kotlin, runs on Java
> * Also available as a Java library in Maven Central repository
> 
> 
> 

**6. [jl](https://github.com/chrisdone/jl)**

> 
> jl ("JSON lambda") is a tiny functional language for querying and manipulating JSON.
> 
> 
> 

**7. [JOLT](https://github.com/bazaarvoice/jolt)**

> 
> JSON to JSON transformation library written in Java where the "specification" for the transform is itself a JSON document.
> 
> 
> 

**8. [gron](https://github.com/tomnomnom/gron)**

> 
> Make JSON greppable!
> gron transforms JSON into discrete assignments to make it easier to grep for what you want and see the absolute 'path' to it. It eases the exploration of APIs that return large blobs of JSON but have terrible documentation.
> 
> 
> 

**9. [json-e](https://github.com/taskcluster/json-e)**

> 
> JSON-e is a data-structure parameterization system for embedding context in JSON objects.
> The central idea is to treat a data structure as a "template" and transform it, using another data structure as context, to produce an output data structure.
> 
> 
> 

**10. [JSLT](https://github.com/schibsted/jslt)**

> 
> JSLT is a complete query and transformation language for JSON. The language design is inspired by jq, XPath, and XQuery.
> 
> 
> 

**11. [JSONata](https://docs.jsonata.org/overview.html)**

> 
> JSONata is a lightweight query and transformation language for JSON data. Inspired by the 'location path' semantics of XPath 3.1, it allows sophisticated queries to be expressed in a compact and intuitive notation.
> 
> 
> 

**12. [JSONPath Plus](https://github.com/JSONPath-Plus/JSONPath)**

> 
> Analyse, transform, and selectively extract data from JSON documents (and JavaScript objects).
> jsonpath-plus expands on the original specification to add some additional operators and makes explicit some behaviors the original did not spell out.
> 
> 
> 

**13. [json-transforms](https://github.com/ColinEberhardt/json-transforms)** Last Commit Dec 1, 2017

> 
> Provides a recursive, pattern-matching approach to transforming JSON data. Transformations are defined as a set of rules which match the structure of a JSON object. When a match occurs, the rule emits the transformed data, optionally recursing to transform child objects.
> 
> 
> 

**14. [json](https://github.com/trentm/json)** Last commit Jun 23, 2018

> 
> json is a fast CLI tool for working with JSON. It is a single-file node.js script with no external deps (other than node.js itself).
> 
> 
> 

**15. [jsawk](https://github.com/micha/jsawk)** Last commit Mar 4, 2015

> 
> Jsawk is like awk, but for JSON. You work with an array of JSON objects read from stdin, filter them using JavaScript to produce a results array that is printed to stdout.
> 
> 
> 

**16. [yate](https://github.com/pasaran/yate)** Last Commit Mar 13, 2017

> 
> Tests can be used as docu <https://github.com/pasaran/yate/tree/master/tests>
> 
> 
> 

**17. [jsonpath-object-transform](https://github.com/dvdln/jsonpath-object-transform)** Last Commit Jan 18, 2017

> 
> Pulls data from an object literal using JSONPath and generate a new objects based on a template.
> 
> 
> 

**18. [Stapling](https://github.com/WelcomWeb/Stapling)** Last Commit Sep 16, 2013

> 
> Stapling is a JavaScript library that enables XSLT formatting for JSON objects.
> Instead of using a JavaScript templating engine and text/html templates, Stapling gives you the opportunity to use XSLT templates - loaded asynchronously with Ajax and then cached client side - to parse your JSON datasources.
> 
> 
> 

Specs:
======

* [JsonPointer](https://www.rfc-editor.org/rfc/rfc6901)

> 
> JSON Pointer defines a string syntax for identifying a specific value
> within a JavaScript Object Notation (JSON) document.
> 
> 
> 

* [JsonPath](http://goessner.net/articles/JsonPath/)

> 
> JSONPath expressions always refer to a JSON structure in the same way as XPath expression are used in combination with an XML document
> 
> 
> 

* [JSPath](https://github.com/dfilatov/jspath)

> 
> JSPath for JSON is like XPath for XML."
> 
> 
> 

* [JSONiq](http://www.jsoniq.org/)

> 
> The main source of inspiration behind JSONiq is XQuery, which has been proven so far a successful and productive query language for semi-structured data
> 
> 
>
Interesting idea. Some searching on Google produced a few pages of interest, including:

* an [outline](http://goessner.net/articles/jsont/) of how such a "jsonT" tool might be implemented, and [some downloads](http://goessner.net/download/prj/jsont/)
* some [discussion of that implementation](http://ajaxian.com/archives/transforming-json)
* a company which [may have implemented something suitable](https://www.p6r.com/articles/2008/05/06/xslt-and-xpath-for-json/)

Hope this helps.