Added decode method to array and result object