Q:

Response as pretty object from executeQueryAsync

After successful execution of context.executeQueryAsync(res, rej); I have weird stuff in res(response) callback with weird object content as { $9_0: something, $bla_bla: anotherSomething}. But I can clearly see pretty response of ProcessQuery response. 
Code I have:
let context = new window.SP.ClientContext();            
window.Microsoft.Office.Server.ReputationModel.Reputation.setRating(
    context, 
    utils.extractGuid(item), 
    item.Id, 
    val);
context.executeQueryAsync(res, rej);

I don't want to use .load() Item to retrieve it's new property, but wanna extract it from response.
Is there way to serialize or retrieve proper things from response?
Example: .setRating()'s ProcessQuery returns new avarageRating as 5

but callback of Promise returns strange looking object

Thanks!

A:

Those are the private properties you should not mess with (Microsoft can change the encoded names for any next version)
Remember this is all (and fairly good) OOP Programming, that means you can't tinker with Properties from out side the Object
Check the .prototype chain (that __proto__ in your screenshot) for available Methods  (better yet, check the documentation... but just checking the pc is often faster)
In the given example

The get_id , get_displayName , get_hasUniqueRoleAssignments are Methods (specific to this type of Object) you can use to access data values
The above is an Item as example

In general with JSOM you have to use Methods; you can't get values from the Object yourself.

A:

Pity, but SharePoint pros do not allow to extract response as is, and only way to achieve expected result is to retrieve adjusted property by my own:
    let context = new SP.ClientContext();   
    let item = context.get_web().get_lists().getById(guid).getItemById(itemId);
    Microsoft.Office.Server.ReputationModel.Reputation.setRating(
        context, 
        guid, 
        itemId, 
        val);
    await new Promise((res, rej) => context.executeQueryAsync(res, rej));
    context.load(item);
    await new Promise((res, rej) => context.executeQueryAsync(res, rej));
    return item.get_item('AverageRating');

