Query and Parse Status Lable Name List

I am doing an API call to get the list of status names available to a status column.

Here is my call;

"{boards (ids: 123) {columns(ids: "status"){settings_str} } }"

Here is the response;

"{\"data\":{\"boards\":[{\"columns\":[{\"settings_str\":\"{\\\"done_colors\\\":[1],\\\"color_mapping\\\":{\\\"0\\\":15,\\\"1\\\":4,\\\"2\\\":107,\\\"3\\\":109,\\\"4\\\":7,\\\"7\\\":16,\\\"9\\\":13,\\\"13\\\":0,\\\"15\\\":9,\\\"16\\\":2,\\\"107\\\":3,\\\"109\\\":1},\\\"labels\\\":{\\\"0\\\":\\\"Client, Vendor, Venue\\\",\\\"1\\\":\\\"Client\\\",\\\"2\\\":\\\"Vendor\\\",\\\"3\\\":\\\"Client, Venue\\\",\\\"5\\\":\\\"\\\",\\\"6\\\":\\\"Qualified Lead\\\",\\\"13\\\":\\\"Partner\\\"},\\\"labels_positions_v2\\\":{\\\"0\\\":5,\\\"1\\\":1,\\\"2\\\":3,\\\"3\\\":6,\\\"5\\\":4,\\\"6\\\":0,\\\"13\\\":2},\\\"labels_colors\\\":{\\\"0\\\":{\\\"color\\\":\\\"#9cd326\\\",\\\"border\\\":\\\"#89b921\\\",\\\"var_name\\\":\\\"lime-green\\\"},\\\"1\\\":{\\\"color\\\":\\\"#9d50dd\\\",\\\"border\\\":\\\"#9238af\\\",\\\"var_name\\\":\\\"purple\\\"},\\\"2\\\":{\\\"color\\\":\\\"#225091\\\",\\\"border\\\":\\\"#225091\\\",\\\"var_name\\\":\\\"navy\\\"},\\\"3\\\":{\\\"color\\\":\\\"#5559df\\\",\\\"border\\\":\\\"#5559df\\\",\\\"var_name\\\":\\\"indigo\\\"},\\\"5\\\":{\\\"color\\\":\\\"#c4c4c4\\\",\\\"border\\\":\\\"#b0b0b0\\\",\\\"var_name\\\":\\\"grey\\\"},\\\"6\\\":{\\\"color\\\":\\\"#037f4c\\\",\\\"border\\\":\\\"#006b38\\\",\\\"var_name\\\":\\\"grass-green\\\"},\\\"13\\\":{\\\"color\\\":\\\"#fdab3d\\\",\\\"border\\\":\\\"#e99729\\\",\\\"var_name\\\":\\\"orange\\\"}}}\"}]}]},\"account_id\"..."

and here is the response only focusing on the settings_str part of the response

{"done_colors":[1],"color_mapping":{"0":15,"1":4,"2":107,"3":109,"4":7,"7":16,"9":13,"13":0,"15":9,"16":2,"107":3,"109":1},"labels":{"0":"Client, Vendor, Venue","1":"Client","2":"Vendor","3":"Client, Venue","5":"","6":"Qualified Lead","13":"Partner"},"labels_positions_v2":{"0":5,"1":1,"2":3,"3":6,"5":4,"6":0,"13":2},"labels_colors":{"0":{"color":"#9cd326","border":"#89b921","var_name":"lime-green"},"1":{"color":"#9d50dd","border":"#9238af","var_name":"purple"},"2":{"color":"#225091","border":"#225091","var_name":"navy"},"3":{"color":"#5559df","border":"#5559df","var_name":"indigo"},"5":{"color":"#c4c4c4","border":"#b0b0b0","var_name":"grey"},"6":{"color":"#037f4c","border":"#006b38","var_name":"grass-green"},"13":{"color":"#fdab3d","border":"#e99729","var_name":"orange"}}}

I need to get the name of each of the labels. Anyone have or can suggest a model so JSON can deserialize the label name information? (For example: Client, Vendor, Qualified Lead).

Hey @dpanscik, how have you been?
I think you can find an answer on the API Playground, it has lots of smaples inside and an “ask AI” feature that might be helpful.

Which programming language are you using?

If you are using JS you can use something like this:

obj1 = {"done_colors".....................,"var_name":"orange"}}}
obj2 = obj1.labels
console.log(Object.values(obj2));