Parse hocon file using shell script
<p>I have one hocon configuration created from JSON file. I need to parse the following hocon and extract the values </p>

<p>sample hocon file:
sample.json</p>

<pre><code>    nodes=[
    {
        host=myhostname
        name=myhostname
        ports {
            # debug port
            debug=9384
            # http Port on which app running
            http=9380
            # https Port on which app running
            https=9381
            # JMX port
            jmx=9383
        }
        type=app
        vm-args=[
            "-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintClassHistogram",
            "-XX:+UseConcMarkSweepGC -XX:+UseParNewGC ",
            "-XX:+UseTLAB -XX:CMSInitiatingOccupancyFraction=80 -XX:+ExplicitGCInvokesConcurrent -verbose:gc",
            "-XX:SurvivorRatio=8 -XX:+UseNUMA -XX:TargetSurvivorRatio=80 -XX:MaxTenuringThreshold=15",
            "-Xmx3200m -Xms3200m -XX:NewSize=1664m -XX:MaxNewSize=1664m -Xss1024k",
            "-server"
        ]
    }
]
profile=java-dev
resources {
cfg-repository {
    branch-name=master
    commit-id=HEAD
    password=sigma123
    url="http://localhost:9890/gitcontainer/demo-cfg"
    username=sadmin
}
databases=[
    {
        connection-string="oracle03:1522:si12c"
        name=cm
        password=coresmp601
        username=coresmp601cm
    },
    {
        connection-string="oracle03:1522:si12c"
        name=am
        password=coresmp601
        username=coresmp601am
    }
]
idp {
    url="https://sohanb:8097/idp"
}
keystores=[
    {
        file-location="/home/smp/runtime/ssl"
        name=identity
        passphrase=kspass
    }
]
admin {
    password=sigma123
    url="http://punws-sohanb.net:9002/"
    username=sadmin
}
}
</code></pre>

<p>Now from this hocon file i want to extract the vm-args.
I have tried different bash tools and sed/awk commands but no luck. </p>

<p>Please suggest!</p>