JSFiddle - React, Tailwind, and code Playground

JavaScript

var ar = [1, 2];

var ob = { };

ob[[1, 2]] = "test";

alert(ob[ar]);