I am trying to have a case expression within case expression in icon-color. My icon-color depends on a combination of to variables. I tryed the following syntax without any success. What is wrong? Is it possible?
"icon-color": [
"case",
["==",["get","status"],"s1"],
["case", ["==",["get","priority"],"p1"], "#111111", ["==",["get","priority"],"p2"], "#222222", "#DDDDDD"]
["==",["get","status"],"s2"],
["case", ["==",["get","priority"],"p1"], "#333333", ["==",["get","priority"],"p2"], "#444444", "#DDDDDD"]
"#777777"]
For starters, you need to put double quotes around your colors (
"#111111") and around property names with hyphens ("icon-color").