json.decode needed before indexing API data
🌙 Lua•Updated 2 days ago•0 views
The response body is a JSON string - run json.decode() on it first to get a table, then index fields like data.title.
Why 'attempt to index a string value' when reading API data
The response body is a JSON string - run json.decode() on it first to get a table, then index fields like data.title.