GitXplorerGitXplorer
s

json-select-transform

public
3 stars
0 forks
0 issues

Commits

List of commits on branch main.
Verified
a02aa1c52d7fe19c1a299e2d7903957bedac1e8e

Interpolation example

sserras committed 4 years ago
Verified
2cb7d4d97cd45607484e065af7ccae9dc5c88307

Fix README

sserras committed 4 years ago
Verified
46071b1629c1094ef53fd009396d7fc3a7ad0d24

Transform arrays + README

sserras committed 4 years ago
Verified
7d2d429c7a58525f835eb02d57781515f102f399

Implement transform too

sserras committed 4 years ago
Verified
c1664893df20156ad21601ac9e5c3fe3d2ede971

One file is enough

sserras committed 4 years ago
Verified
b559e6d6feaa4d31d5122b0448ab3f860d1308fc

Initial commit

sserras committed 4 years ago

README

The README file for this repository.

json-select-transform

A Haskell library for matching/selection and transformation of JSON document. Inspired by ST.js.

select

  • template: { "number" : "{{x}}" }
  • document: { "number" : 1 }
  • result: { x -> 1 }

transform

  • template: { "number" : "{{x}}" }
  • assignment: { x -> 1 }
  • result: { "number" : 1 }

transform with interpolation

  • template: { "message" : "the result is {{x}}" }
  • assignment: { x -> 1 }
  • result: { "message" : "the result is 1" }

transform with array

  • template: { "{{#each n}}" : { "number" : "{{n}}" } }
  • assignment: { n -> [1, 2] }
  • result: [ { "number" : 1 }, { "number" : 2 } ]