ferdelyi commented on code in PR #7330:
URL: https://github.com/apache/hadoop/pull/7330#discussion_r1934174684
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/get-from-map.js:
##########
@@ -0,0 +1,36 @@
+import Ember from 'ember';
+
+
+function getNestedValue(obj, path) {
+ return path.split('.').reduce((acc, key) => {
+ if (acc === null || acc === undefined) {
+ return undefined;
+ }
+
+ // Handle array indexing within the partition map
+ const arrayMatch = key.match(/(\w+)\[(\d+)\]/);
Review Comment:
Added the missing sample input, thanks for pointing it out!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]