Can we store complex JSON in KV as a value? I have a json that’s 4,5 levels deep and need to know if
Can we store complex JSON in KV as a value? I have a json that’s 4,5 levels deep and need to know if that’s possible with KV.
put accepts any string, ReadableStream, or ArrayBuffer so you can just JSON.stringify it: https://developers.cloudflare.com/kv/api/write-key-value-pairs/

json.Stringify is what I'll go with . Thanks for the example, they are helpful._preview KV dashboard. How do I get it available locally? I run npx wrangler dev —remote. npx wrangler dev --remote. the local is when your worker is running only locally npx wrangler dev. each is independent and you would need to write data in any of these dev modes to get data in therenpx wrangler dev --remote, this is quite dangerous which is why the preview namespace is the default



list(customerId) and then 1 get each. or should I have a index. get(customerId-index) and then the 1 get each



secondaryStorage: {
get: async (key) => {
return await c.env.authKV.get(key);
},
set: async (key, value, ttl) => {
await c.env.authKV.put(key, value, { expirationTtl: ttl });
},
delete: async (key) => {
await c.env.authKV.delete(key);
},
},