Js Loop Through Object And Change Values Sql