Here's a solution to convert the name, value pairs back to columns as if you had stored the data in a normal manner:
SELECT
JSON_UNQUOTE(JSON_EXTRACT(mytable.attributes, CONCAT('$."', k.id, '".name'))) AS name,
JSON_UNQUOTE(JSON_EXTRACT(mytable.attributes, CONCAT('$."', k.id, '".value'))) AS value
FROM mytable
CROSS JOIN JSON_TABLE(JSON_KEYS(mytable.attributes), '$[*]' COLUMNS (id CHAR(36) PATH '$')) AS k;
Output:
+-------+-------+
| name | value |
+-------+-------+
| speed | 230 |
| power | 12v |
+-------+-------+
From there I'll trust you can figure out how to put that in a derived table subquery and do the operations you need to do on it.
Note that using JSON_TABLE() requires MySQL 8.0. If you use an older version of MySQL, it won't work.
This begs the question of why didn't you just store the data in the normal way to start with. In my opinion, using JSON in MySQL makes a lot of queries more complex and difficult to write, difficult to debug, difficult to optimize. The queries would be simpler if you stored this data as multiple rows of another table, instead of using JSON.