I am trying to encode data(using btoa() ) send it to a data-base then when i retrieve it and decode it i am unable to access the content
i just get an array of [object , Object ]
data = [object Object],[object Object],[object Object],....
output of : JSON.parse(data) = [object Object]
output of : JSON.parse(JSON.stringify(data)) = "[object,Object]"
output of : data[0] = [
output of : actual.hasOwnProperty("key") = false
i tried : x = `[${data}]` same problem it only read the data object as a string
so actually i was encoding a js object
adding :data = JSON.stringify(data).toString();
solved the problem