I'm setting up an API for a web app I am making to communicate with a database and need to support multiple tables.
I have a JSON object, well table of JSON objects ([{"name":"video_games", "columns":["name", "console", "wiki"]}, {"name":"game_wishlist", "columns":["name", "console", "wiki"]}]), that has the names of the tables and the columns, but I need a way to hit another JSON object to get specific data using the specifications in this object.
Example: games[i] = [table[i].name, table[i].console, table[i].wiki] is what I currently have but I need a way where I can set the name, console, and wiki to something else for other tables from the object I showed above without just setting up a ton of if statements and hard coding it.