iuris
Posts: 0
Joined: Sun Dec 15, 2013 1:23 pm

How I can filter the contents of an RSS feed?

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

How I can filter the contents of an RSS feed?

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?

iuris
Posts: 0
Joined: Sun Dec 15, 2013 1:23 pm

How I can filter the contents of an RSS feed?

Hi

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

Image
Image

This is the result
Image

I would like the result to be
Image

iuris
Posts: 0
Joined: Sun Dec 15, 2013 1:23 pm

How I can filter the contents of an RSS feed?

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

How I can filter the contents of an RSS feed?

Hi,

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

iuris
Posts: 0
Joined: Sun Dec 15, 2013 1:23 pm

How I can filter the contents of an RSS feed?

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.

iuris
Posts: 0
Joined: Sun Dec 15, 2013 1:23 pm

How I can filter the contents of an RSS feed?

your proposal just leave it empty only the label_tituloLaVanguardiaS

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

How I can filter the contents of an RSS feed?

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

iuris
Posts: 0
Joined: Sun Dec 15, 2013 1:23 pm

How I can filter the contents of an RSS feed?

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

Return to “Issues”