my API is responding as below
{"permissions":
[{"id":1,"product_id":10,"permission_type":"ADD","name":"Add"},
{"id":2,"product_id":10,"permission_type":"UPDATE","name":"Update"},
{"id":3,"product_id":10,"permission_type":"DELETE","name":"Delete"}
]
}
when i use code
const {
states: { permissions },
}:any = useUMSStoreContext();
const myJSON = JSON.stringify(permissions);
console.log('JSON format', myJSON)
I need to get elements like name or permission_type but not getting success using Typescript. I might be picking wrong way to convert into JSON.