Pass category condition into array map