Page 1 of 1

How I can filter the contents of an RSS feed?

Posted: Tue Dec 24, 2013 12:15 pm
by iuris

I want to display only those that contain a word.
With this code I get the contents of the news that interests me out "".
function filtroContenido(value){
var palabrasClave=["ABOGAD","DETENID"]
var nada=""
var valido=false;
for(i = 0; i < palabrasClave.length; i++) {
if (value.toUpperCase().indexOf(palabrasClave)!=-1){
valido=true;
i=palabrasClave.length;
}

Code: Select all

 } 
 if (valido){return value}else {return nada}; 

}

But what I want is that the sun comes out the corresponding item. I want only the corresponding mobilegrid out.

Thanks


How I can filter the contents of an RSS feed?

Posted: Tue Dec 24, 2013 12:41 pm
by Kateryna Grynko

Hi,

Do you want to parse data from service response? What exactly do you want to get? Could you please post screenshots of this data?


How I can filter the contents of an RSS feed?

Posted: Tue Dec 24, 2013 1:27 pm
by iuris

Hi

http://feeds.feedburner.com/lavanguar...

Image
Image

This is the result
Image

I would like the result to be
Image


How I can filter the contents of an RSS feed?

Posted: Tue Dec 24, 2013 1:30 pm
by iuris

I applied the function that I put at the beginning of the forum


How I can filter the contents of an RSS feed?

Posted: Tue Dec 24, 2013 2:14 pm
by Kateryna Grynko

Hi,

Let's make sure the element is not empty. Add this JS code to element mapping:
preif (value === ""){
element&#46;detach();
}/pre


How I can filter the contents of an RSS feed?

Posted: Tue Dec 24, 2013 2:43 pm
by iuris

Hi,
How I can make the mobilegrid_32 empty element (look picture)? I also would make void all labels contained in the mobilegrid_32.
The condition for empty depends on the contents of item | title.


How I can filter the contents of an RSS feed?

Posted: Tue Dec 24, 2013 2:45 pm
by iuris

your proposal just leave it empty only the label_tituloLaVanguardiaS


How I can filter the contents of an RSS feed?

Posted: Tue Dec 24, 2013 3:46 pm
by Kateryna Grynko

To remove the ones you don't need replace this code in mapping:preif (valido){return value}else {return nada};/preWith the following:preif (valido)
{
return value
} else {
$(element)&#46;closest("table")&#46;detach();
return nada
};/pre


How I can filter the contents of an RSS feed?

Posted: Tue Dec 24, 2013 4:58 pm
by iuris

The first tests have worked well.
Thank you very much. You are a great team!
Merry Christmas and Happy New Year