How to retrieve full profile of linkedin user via Javascript API
<p>I am trying to retrieve the full profile (especially job history and educational qualifications) of a linkedin user via the Javascript API. I have managed to piece together the following code from google and stack overflow:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Test&lt;/title&gt;
&lt;script type="text/javascript" src="http://platform.linkedin.com/in.js"&gt;
    api_key:   blahblahblah
    onLoad:    onLinkedInLoad
    authorize: true
&lt;/script&gt;

&lt;script type="text/javascript"&gt;
function onLinkedInLoad() {
   IN.Event.on(IN, "auth", onLinkedInAuth);
}
function onLinkedInAuth() {
   IN.API.Profile("me").result(displayProfiles);
   // IN.API.Profile("me").fields(["industry", "network", "date-of-birth", "educations:(id,school-name)"]).result(displayProfiles);
}
function displayProfiles(profiles) {
   member = profiles.values[0];
   document.getElementById("profiles").innerHTML =
   "&lt;p id=\"" + member.id + "\"&gt;Hello " + member.firstName + " " + member.lastName + "&lt;/p&gt;";

   for(education in profiles.educations) {
      var id = education.id;
      var name = education.schoolName;
      console.log(name);
   }
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;script type="IN/Login"&gt;&lt;/script&gt;
&lt;div id="profiles"&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>This manages to retrieve the logged in user's name and surname after they grant access. However it completely fails to retrieve anything else. I am using a company login for linkedin and I can access all the user's information via the rest api, so it's not an access issue; I just don't know (and can't find any examples) of how to use the Javascript API. How would I specify what information to retrieve and how would I then identify that information in the returned JSON object?</p>