Hi,
The spjs.utility.userProfile function doesn’t really strip away or do anything with the values, but it is using the old userprofileservice.asmx and not REST so you might not get the same format on the output as with REST. How did you query to get the content in the first screenshot?
You can try this function to get it with REST (only current users profile in this example):
function getCurrenUserProfileREST() {
var d = jQuery.Deferred();
jQuery.ajax({
"url": _spPageContextInfo.siteAbsoluteUrl + "/_api/SP.UserProfiles.PeopleManager/GetMyProperties",
"method": "GET",
"headers": { "Accept": "application/json;odata=verbose" },
"success": function (data) {
console.log(data);
var r = {};
jQuery.each(data.d.UserProfileProperties.results, function (i, o) {
r[o.Key] = o.Value;
});
d.resolve(r);
},
"error": function (error) {
d.reject(error);
}
});
return d.promise();
}
Use it like this:
getCurrenUserProfileREST().done(function (data) {
console.log(data);
});
Alexander