Create rules to filter dataset using jquery