I'm trying to make my chart component flexible so that it can take an object with any key and then convert that key to one that the component expects. For example, say I have:
{"Days of week":["Mon","Tue","Wed","Thu","Fri"],"Number of requests":[12,45,36,97,78]}
I'd like to change it to:
{"x":["Mon","Tue","Wed","Thu","Fri"],"y":[12,45,36,97,78]}
I could enforce a schema for the component instead and handle keys as additional attributes (for labels, etc.), but looking to see if I can recreate the object so that the keys can be arbitrary.