fixed bug in api.js where map was being called instead of a single call to formatNestedMatch