Need help to sort index pages using InDesign script
Hi All,
I am looking for the solution to fix Index pages.
I have an array and need pages sorted as per below example:
var myArray = [5, 6, 7, 43, 45, 65, 66, 77, 98, 99, 100, 123, 155, 166]
output = [5ff, 43, 45, 65f, 77, 98ff, 123, 155, 166]
so logic is if there is page range continue more than 2 thfn "ff" will add and if its just more than one time then "f". I am unable to logic this loop so any help will be appreciated.
Thanks,
Shonky
