You're given a JSON array of Illinois Cities. With this list, your task is to build out a function that accepts a string and returns back cities that contain the given characters. The function should accept another parameter to limit the amount of matches it returns. The results should be returned in alphabetical order with priority given to matches that start with the characters.
Use your language or framework of choice, and store the data in any fashion you'd like, as long as it's web friendly.
[
"Summit", "Palatine", "Naperville", "North Chicago", "Springfield",
"Arlington Heights", "Oak Park", "Moline", "Calumet City", "Ottawa",