@monabbous/unflatter

This library is used to unflatten an object to nested object form.

Usage no npm install needed!

<script type="module">
  import monabbousUnflatter from 'https://cdn.skypack.dev/@monabbous/unflatter';
</script>

README

Unflatter

This library is used to unflatten an object to nested object form.

for example:

const data = {
    "name[value]": "Ali Baba",
    "name[operator]": "LIKE",
    "phone": "001135"
}

console.log(unflatter(data));

output:

{
    "name" : {
        "value": "Ali Baba",
        "operator": "LIKE
    },
    "phone": "001135"
}

that's it just install with npm i @monabbous/unflatter and start unflatting :D