How would I get just the `results` from
How would I get just the
results
from the return Response.json(results) area? I'm getting this: 3 Replies
Hey! Like @lambrospetrou pointed out, the response is an object, so you can try
resonse.results
if you're using JS.
I had a quick go on ChatGPT, maybe this will work?
Full code:
Our return objects are documented here
https://developers.cloudflare.com/d1/worker-api/return-object/
Cloudflare Docs
Return objects · Cloudflare D1 docs
Some D1 Worker Binding APIs return a typed object.
response["results"] behaves the same as
response.get("results")
it might be possible that response.results works though
i'll give that a try. thanks!