Destrocamos
Destrocamos
CDCloudflare Developers
Created by Destrocamos on 5/22/2024 in #workers-help
Upload JSON object to KV
❯ curl localhost:8787/releases/cenas-1 | jq

"{ \n \"fefe-hub\": {\n \"v2.3.4\": {\n \"type\": \"release\",\n \"download_link\": \n\"https://example.com/-hub-v2.3.4.zip\"\n },\n \"v2.2.1\": {\n \"type\": \"beta\",\n \"download_link\": \n\"https://example.com/-hub-beta-v2.2.1.zip\"\n },\n \"v2.4.5\": {\n \"type\": \"release\",\n \"download_link\": \n\"https://example.com/--v2.4.5.zip\"\n }\n },\n \"fefef\": {\n \"v2.3.4\": {\n \"type\": \"release\",\n \"download_link\": \n\"https://example.com/-hub-v2.3.4.zip\"\n },\n \"v2.2.1\": {\n \"type\": \"beta\",\n \"download_link\": \n\"https://example.com/-hub-beta-v2.2.1.zip\"\n },\n \"v2.4.5\": {\n \"type\": \"release\",\n \"download_link\": \n\"https://example.com/-hub-v2.4.5.zip\"\n }\n }\n}"
❯ curl localhost:8787/releases/cenas-1 | jq

"{ \n \"fefe-hub\": {\n \"v2.3.4\": {\n \"type\": \"release\",\n \"download_link\": \n\"https://example.com/-hub-v2.3.4.zip\"\n },\n \"v2.2.1\": {\n \"type\": \"beta\",\n \"download_link\": \n\"https://example.com/-hub-beta-v2.2.1.zip\"\n },\n \"v2.4.5\": {\n \"type\": \"release\",\n \"download_link\": \n\"https://example.com/--v2.4.5.zip\"\n }\n },\n \"fefef\": {\n \"v2.3.4\": {\n \"type\": \"release\",\n \"download_link\": \n\"https://example.com/-hub-v2.3.4.zip\"\n },\n \"v2.2.1\": {\n \"type\": \"beta\",\n \"download_link\": \n\"https://example.com/-hub-beta-v2.2.1.zip\"\n },\n \"v2.4.5\": {\n \"type\": \"release\",\n \"download_link\": \n\"https://example.com/-hub-v2.4.5.zip\"\n }\n }\n}"
4 replies
CDCloudflare Developers
Created by Destrocamos on 5/22/2024 in #workers-help
Upload JSON object to KV
Thanks a lot fr your answer! It works but I was expecting to have a JSON object and the value and then retrieve it by the key but seems it does not see it as a valid JSON
4 replies