First, ordering is undefined. You should never make an assumption about the order in which JSON data is returned to you. Just because it is the "last" value now doesn't mean it might be the next time you call it. To get specific fields you should query directly for the fields.
In your example typeProperties
is wrapped in a JContainer
which is just a wrapper around the underlying JSON data. This allows it to handle arbitrary JSON without having to parse it, until you need it. When you then call ToString
it is simply returning the JSON it is wrapping. When you use things like typeProperties[0].dataset
(just as an example) it is parsing through the JSON to find what you are looking for.
Without running the code itself, I'm guessing the additional properties is going to be a hashset so perhaps something like this gives you the "dataset".
$AllLinkedService.Activities.AdditionalProperties["typeProperties"].dataset