diff --git a/subsystem/api.js b/subsystem/api.js
index <HASH>..<HASH> 100644
--- a/subsystem/api.js
+++ b/subsystem/api.js
@@ -30,6 +30,14 @@ phoxy._ApiSubsystem =
       phoxy._.api.ajax(phoxy.Config()['api_dir'] + "/" + url, function(response)
         {
           data = JSON.parse(response);
+
+          // http://stackoverflow.com/questions/4215737/convert-array-to-object
+          if (Array.isArray(data.data))
+            if (data.data.length == 0)
+              data.data = {};
+            else
+              data.data = data.data.reduce(function(o, v, i) { o[i] = v; return o; });
+
           if (params == undefined)
             params = [];
           params.unshift(data);
Fix issue when data array causing recursive load at Fancy