JS: How to convert list item to lowercase and use it to get key from an object?
Advertisements I have a list and an object and I would like to use a list value to get one of the keys’ values. let devices = [‘001A2208B97D’,’001A2208C9FA’,’001A2214ADC8′,’001A2214A73A’,’001A2214B86E’,’001A2214A6DF’,’001A2214ADBF’,’001A2208CFD3′] let entities = [‘Temperature’, ‘Valve’, ‘Battery’, ‘Offset’] let temperature = { device_class: ‘temperature’, icon: "hass:thermometer-bluetooth", unit: "°C"} let valve = { device_class: ”, icon: "hass:valve", unit: "%"}… Read More JS: How to convert list item to lowercase and use it to get key from an object?