Created
November 18, 2010 09:09
-
-
Save koush/704798 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var json = JObject.Parse(e.Result); | |
var entries = json["feed"]["entry"]; | |
var picturesWithNumbers = | |
from entry in entries | |
let numbers = entry["gd$phoneNumber"] | |
let link = entry["link"] | |
let image = (from linkEntry in link where linkEntry["rel"].Value<string>() == "http://schemas.google.com/contacts/2008/rel#photo" select linkEntry).FirstOrDefault() | |
where numbers != null && link != null && | |
image != null | |
select new | |
{ | |
Numbers = from number in numbers select number["$t"].Value<string>(), | |
Photo = image.Value<string>() | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment