Hi , i tried in javascript that program that gives me Error: missing: 0
type dataHie = {
"host": string,
"tokenId": string
}
const data = [
{ host: "100", tokenId: "1002" }, { host: "0", tokenId: "100" },{ host: "0", tokenId: "2" }
]
const _hierStrat=stratify().id(function(d:dataHie){return d.tokenId}).parentId(function(d: dataHie){ return d.host})(data)
, please can you tell what i did wrong.
thank you
Hi , i tried in javascript that program that gives me Error: missing: 0
type dataHie = {
"host": string,
"tokenId": string
}
const data = [
{ host: "100", tokenId: "1002" }, { host: "0", tokenId: "100" },{ host: "0", tokenId: "2" }
]
const _hierStrat=stratify().id(function(d:dataHie){return d.tokenId}).parentId(function(d: dataHie){ return d.host})(data)
, please can you tell what i did wrong.
thank you