def build_linked_resources_map(data)
      data["linked"].each_with_object({}) do |(type, resources), obj|
        obj[type] ||= {}
        resources.each do |linked_resource|
          obj[type][linked_resource["id"]] = linked_resource
        end
      end
    end
def build_linked_resources_map(data)
      data["linked"].each_with_object({}) do |(type, resources), obj|
        obj[type] ||= {}
        resources.each do |linked_resource|
          obj[type][linked_resource["id"]] = linked_resource
        end
      end
    end
Builds a map to enable getting references by type and id

 eg.
 {
   "users" => {
     "1" => { "id" => "1", "name" => "John" },
     "5" => { "id" => "5", "name" => "Walter" },
   }
 }