score:1

if you are certain that the values will always be in their given position. you can do something like

const clusterid = href.split('/')[5]
const analysisid = href.split('/')[7]

score:1

if you know what's the keyword that precedes your id:

const getvalue = (string, id) => {
    const stringarray = string.split("/");
    const index = stringarray.indexof(id);
    return stringarray[index + 1];
}

clusterid = getvalue(json[0].analysisunits.links[0].href, "clusters");
analysisid = getvalue(json[0].links[0].href, "aus");

Related Query

More Query from same tag