improving curl post body flattening for multidimensional arrays