This is a simple tool to map your JSON or JavaScript objects. You can use it to map your objects to a different shape, transform the values, or filter out some properties.
FAQ
1. Paste your JSON or JavaScript object into the left editor. 2. Build your output by selecting what fields you want to create, what input field they are mapped to, and what kind of transformations you want to apply 3. Click the "Generate output" button to see the result. 4. Copy the result from the right editor.
You can apply basic transformations like parseInt, parseFloat, toString, toUpperCase, etc.
You can also apply custom transformations by providing a JavaScript function in Prerequisites input field. The function should accept the value to transform as the first argument and any additional arguments you provide. Just select customFunction transformer and input the name of your function.
Prerequisites are JavaScript code snippets that are executed before the transformation function. You can use them to define helper functions or define constants/enums.
You can import some data file (.csv only for now) and use the data inside it in your transformations.
After uploading the file you can access the data in your custom functions, an object (or array) will be create with the same name as the file (without the extension).
For example, if you upload a file named myAwesomeData.csv, you can access the data in your custom functions like this: myAwesomeData[0].name.
Yes! Your data never leaves your browser, you can check the network tab in your browser developer tools to make sure!
There are two ways to go about it: 1. You can use the customFunction transformer and provide your own JavaScript function. 2. If you think this is a standard transformation that should be included in the tool, shoot me a DM on Twitter.
Not yet, for now only the last mapping is saved in your browser local storage. If you think this feature would be useful, let me know on Twitter.