Skip to content

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

@divyansh22

Description

@divyansh22

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions