Skip to content

Instantly share code, notes, and snippets.

@thecrypticace
Created December 30, 2016 01:25
Show Gist options
  • Save thecrypticace/0821549f0932534de419b07abc33d8c6 to your computer and use it in GitHub Desktop.
Save thecrypticace/0821549f0932534de419b07abc33d8c6 to your computer and use it in GitHub Desktop.
<?php
$entries = json_decode(file_get_contents("whatever.json"), true);
$tokensPerEntry = array_map(function ($entry) {
return $entry["requirements"]["others"];
}, $entries);
$tokens = array_merge([], ...$tokensPerEntry);
// other code here…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment