In the haxe I have got prepared structures for product and prices:
typedef ProductItem = {
public var id:Int;
public var title:String;
public var prices:Map<String,Price>;
}
typedef Price = {
public var price:Float;
public var priceFormatted:String;
}
I am trying with many ways how to parse it from native php to structured form in Haxe but still failed:
1. I need to iterate each item in object because between variables on BE and FE is sometimes different naming
2. i need to specify Iterable or Iterator - i think its should have lots real examples
3. how to iterate `prices` - its a map not array and this is also struggeling how to get into ds.Map each price (eur, usd, ...)?
Do you have any showcase for processing of these data?
Thank you so much again,
Reflection turns static into dynamic access on the static target, so it slow(est) solution. However, on dynamic targets like JS reflection should have smaller overload, however it is always better to check generated code.
Fastest solution could be for (key => val in map) because of the optimizations, but don’t take my words for granted because I haven’t checked generated code for long time.