JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://code.jquery.com/jquery-3.2.1.js"></script>

JavaScript

var values = [];
    values["key1"] = "value";
    values["key2"] = "value"
var result = [];
for (var key in values) {
    result = result.concat(values[key]);
}
alert(result);