Adding extra source to Wordpress plugin

Using wordpress Plugin Version 2.11.2

I have been trying to add an extra source as explained here:

I am not having any luck. Is there a better demonstration of this?

So in the end, I found it easier to push to the sources this way, before the each():

algolia.autocomplete.sources.push(
{

admin_name: "All posts",
enabled: true,
index_id: "the_index_name",
index_name: "the_index_name",
max_suggestions: 5,
position: 1,
tmpl_suggestion: "autocomplete-post-suggestion",
});