finally converted json to array and fixed test