properties icon indicating copy to clipboard operation
properties copied to clipboard

Convert ini file with dot-delimited notation into one big object

Open divyansh22 opened this issue 3 years ago • 0 comments

Hi I want to covert my ini file which looks like :

info.info1=ans1. info.info2=ans2. info3.info4=ans3. info5.info6=ans4.

to an object:

{ info:{ info1: ans1, info2:ans2 }, info3:{ info4:ans3 }, info5{ info6: ans4 } }

in the version 2.1.1 this was working by

const propertiesReader = require('properties-reader'); const properties = propertiesReader("relative path"); const obj = properties.path();

but now when I updated to the latest version 2.2.0 path is returning an empty object

in the latest version

const obj = properties.getAllProperties(); is working but i want a nested object

divyansh22 avatar Jun 16 '22 08:06 divyansh22