#Q: how to get meta of current state

1 messages · Page 1 of 1 (latest)

plucky panther
#

just wondering is there an easy way to get the value of meta of current state(node)?

{
  value: {
      "Foo": "Bar"
  },
  meta: {
      "Foo.Bar": {
          "value": 42
      }
  }
}

I thought that state.meta will return { "value": 42 } but it actually returns

{
  "Foo.Bar": {
    "value": 42
  }
}
plucky panther
#

It seems like I can get it via the first configuration object but uncertain if that's the right way

const [config] = state.configuration || [];
const { value } = config?.meta || {};