Fix document filter sentance on JS update

Due to the way rails does id generation it took the square brackets at
the end of the field names and converted them into a single underscore.
This broke the mustache sentance generation as it didn't find the keys
it was looking for.