0

How to display abbreviations in json instead of displaying full values if 10,000 as 10 k if 123000000 as 123 M

How to display abbreviations in json instead of displaying full values if 10,000 as 10 k if 123000000 as 123 M

Shree
  • 1
  • 2
  • 1
    AFAIK, there's no built-in functionality to do this. You will likely need to define and register a custom function (see [Programming constructs](https://docs.jsonata.org/programming) and [Embedding and Extending JSONata](https://docs.jsonata.org/embedding-extending)) and then write the code to do it. See https://stackoverflow.com/a/60980688/664577 for how to do it in JavaScript. – Anthony Accioly Apr 06 '23 at 08:28
  • Could provide me example code in jsonata – Shree Apr 06 '23 at 09:02
  • I can have a look (or someone else from the community eventually will), but to be able to help you in a more concrete way, please provide a [MVE](https://stackoverflow.com/help/minimal-reproducible-example). Also please make sure to edit your tags and mark the programming language that you are using besides JSONata (there are bindings for many languages). Once you do, leave a comment here. – Anthony Accioly Apr 06 '23 at 09:06

0 Answers0