Update util.js

Added support to query indexes