parsing obj for ajax