I am trying to generate shipping label with easypost but I am stuck at the price selection.
Unfortuanly, eaypost create rate object with different order in the Rates table price every time.
For example I can select the object ] 2 [ but the price of this rate object can change.
I am trying to use a function like sort() to re arrange the rates table by the lowest price and select the first object.
I am unsure how to use a function like sort() or find() with an array.
Have you tried to use min function? For this function, you have to be sure that the out coming data is a number and if not you can use function parseNumber.
Don’t hesitate to contact us if you require further assistance.