JSFiddle - React, Tailwind, and code Playground

by Eduardo Orive

JavaScript

var arr = [[ ['firstName', 'Joe'], ['lastName', 'Blow'], ['age', 42], ['role', 'clerk']], [['firstName', 'Mary'], ['lastName', 'Jenkins'], ['age', 36], ['role', 'manager'] ]];

var empty = {};
var result = arr.map(function(objectArray){
  var object = this;
	var attribute = objectArray.map(function(attrArray){
    var name = attrArray[0], value = attrArray[1];
  	object[name] = value;
    return object;
  }, object);
  return this;
}, empty);

console.log(result);