1

In a react typescript application ,I have a polaris table .In columnDefinition,How to get the value of "Key" which is an array inside an object

{
          name: "Item 1",
          alt: "First",
          parentObj: {
            innerObj: {
              Key: ["T4i"],
                         }
          },
          description: "This is the first item",
        },
        {
          name: "Item 2",
          alt: "Second",
          parentObj: {
            innerObj: {
              Key: ["T4i"],
                      }
          },
          description: "This is the second item",

        },

Column Definition,What should I give in 'cell' to get the value of 'key'

 {
          id: “name”,
          header: "Variable name",
          sortingField: "name”,
          cell: ({ name }: { name: string }): string => name,
        },
        {
          id: "value",
          header: "Text value",
          cell: e => e.alt,
          sortingField: "alt”,  
          cell: ({ value }: { value: string }): string => value,
        },
          
      ]}
Sangeetha
  • 13
  • 3

0 Answers0